#!/bin/bash
# Backup a database *locally* to /backups/.

DB=$1

/usr/bin/pg_dump -C $DB | /usr/bin/xz > /backups/$DB-$(date +%F).dump.xz
